home *** CD-ROM | disk | FTP | other *** search
- property pCloseBoxObj, pFolderButtonObj, pPrinterButtonObj, pDiskButtonObj, pkListSprite, pScrollbarObj, pOpenButtonObj, pRolloverTextObj
-
- on new me
- pkListSprite = 7
- pCloseBoxObj = new(script("close box button"), "close box", "Global", 5, the loc of sprite 5)
- Inscope(pCloseBoxObj)
- pFolderButtonObj = new(script("folder title bar button"), "search results open", "Internal", 9, the loc of sprite 9)
- Inscope(pFolderButtonObj)
- pPrinterButtonObj = new(script("printer title bar button"), "search results print", "Internal", 10, the loc of sprite 10)
- Inscope(pPrinterButtonObj)
- pDiskButtonObj = new(script("disk title bar button"), "search results save", "Internal", 11, the loc of sprite 11)
- Inscope(pDiskButtonObj)
- pOpenButtonObj = new(script("open button"), "open button", "Internal", 18, the loc of sprite 18)
- Inscope(pOpenButtonObj)
- disable(pOpenButtonObj)
- rolloverList = []
- addAt(rolloverList, 5, 16)
- addAt(rolloverList, 9, 15)
- addAt(rolloverList, 10, 11)
- addAt(rolloverList, 11, 10)
- pRolloverTextObj = new(script("rollover text"), rolloverList)
- setupScrollbar(me)
- cursor = [member("point hand"), member("point hand mask")]
- repeat with rc in [5, 9, 10, 11]
- set the cursor of sprite rc to cursor
- end repeat
- return me
- end
-
- on dispose me
- condemn(pCloseBoxObj)
- condemn(pPrinterButtonObj)
- condemn(pDiskButtonObj)
- end
-
- on getHitList me
- return value(the text of field "hitList field")
- end
-
- on getCloseBoxObj me
- return pCloseBoxObj
- end
-
- on getfolderButtonObj me
- return pFolderButtonObj
- end
-
- on getPrinterButtonObj me
- return pPrinterButtonObj
- end
-
- on getDiskButtonObj me
- return pDiskButtonObj
- end
-
- on getScrollbarObj me
- return pScrollbarObj
- end
-
- on getOpenButtonObj me
- return pOpenButtonObj
- end
-
- on getSelection me
- return(pSelection)
- end
-
- on getRolloverTextObj me
- return pRolloverTextObj
- end
-
- on setupScrollbar me
- bedChannel = 13
- textChannel = 7
- hiliteChannel = 1
- pScrollbarObj = new(script("text scroll bar"), bedChannel, textChannel, hiliteChannel)
- end
-
- on clickHitList me
- clickedLine = the mouseLine
- theText = line clickedLine of field "results field"
- if (clickedLine <= 0) or (clickedLine > count(getHitList(me))) or (stripPunct(theText) = EMPTY) then
- setSelection(pScrollbarObj, 0)
- disable(pOpenButtonObj)
- else
- oldSelection = getSelection(pScrollbarObj)
- setSelection(pScrollbarObj, clickedLine)
- enable(pOpenButtonObj)
- if the doubleClick or (clickedLine = oldSelection) then
- openSelection(me)
- end if
- end if
- end
-
- on openSelection me
- recordNum = getAt(getHitList(me), getSelection(pScrollbarObj))
- cursor(4)
- tell the stage
- findAndOpenMediaWindow(recordNum)
- end tell
- cursor(-1)
- end
-